import Cookies from 'js-cookie'

const TokenKey = 'hrsaas-ihrm-token' // token的key
const TimeKey = 'hrsaas-time-key'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getTimeStamp() { // 获取时间戳
  return Cookies.get(TimeKey)
}

export function setTimeStamp() { // 设置时间戳
  Cookies.set(TimeKey, Date.now())
}
